<?php
require("_exampleStart.php");

require_once('Zend/Cache.php');
require_once('Zend/Cache/Backend/Memcached.php');
$cache = Zend_Cache::factory('Core', 'Memcached', array('automatic_serialization' =>true));

function addTest($x)
{
	global $cache;

	$varName = 'Z' . $x;

	if(!$result = $cache->load($varName))
	{
		$result = getProduct(true, false, 50);
		$cache->save($result, $varName);
	}
	else
	{
		$result = $cache->load($varName);
	}
}

function deleteTest($x)
{
	global $cache;

	$varName = 'Z' . $x;
	$cache->remove($varName);
}


require_once("_exampleEnd.php");